I am using Cygwin and try to run a bash script which uses the pwd
command to construct a path and then generate a directory. The problem is that the directory is created under c:\cygdrive\c
rather than under c:\
(when I execute cd /cygdrive/c
I will arrive at c:\cygdrive\c
. Here are my current mounts:
C:/cygwin/bin on /usr/bin type ntfs (binary,auto)
C:/cygwin/lib on /usr/lib type ntfs (binary,auto)
C:/cygwin on / type ntfs (binary,auto)
C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
E: on /cygdrive/e type vfat (binary,posix=0,user,noumount,auto)
Does anybody know what is configured wrongly?
UPDATE
Let me try to make it more clear (because all comments mention the script but I am sure the problem is not the script): I do the following on the Windows command prompt:
C:\>pwd
/cygdrive/c
C:\>cd /cygdrive/c
C:\cygdrive\c>
But actually the cd
should arrive at c:\
.
Is it perhaps a problem of the mount order?
Copyright Notice:Content Author:「user2683038」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/27209772/mounting-of-cygdrive-c-resolves-to-c-cygdrive-c